package com.ruoyi.prod.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.prod.enums.AssetState;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 资产管理-资产台账
 * </p>
 *
 * @author 强子初
 * @since 2023-02-18
 */
@Getter
@Setter
@TableName("prod_asset")
@ApiModel(value = "ProdAsset对象", description = "资产管理-资产台账")
public class ProdAsset extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty("采购信息")
    @TableField("purchase_id")
    private String purchaseId;

    @ApiModelProperty("采购单号")
    @TableField("purchase_odd")
    private String purchaseOdd;

    @ApiModelProperty("资产编码")
    @TableField("code")
    private String code;

    @ApiModelProperty("资产名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("资产类别id")
    @TableField("asset_type_id")
    private String assetTypeId;

    @ApiModelProperty("资产类别名称")
    @TableField("asset_type_name")
    private String assetTypeName;

    @ApiModelProperty("计量单位")
    @TableField("unit")
    private String unit;

    @ApiModelProperty("规格型号")
    @TableField("model")
    private String model;

    @ApiModelProperty("资产原值")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty("使用年限")
    @TableField("use_life")
    private Integer useLife;

    @ApiModelProperty("残值率")
    @TableField("value_rate")
    private BigDecimal valueRate;

    @ApiModelProperty("资产状态")
    @TableField("asset_state")
    private AssetState assetState;

    @ApiModelProperty("资产状态集合")
    @TableField(exist = false)
    private List<AssetState> assetStateList;

    @ApiModelProperty("id集合")
    @TableField(exist = false)
    private List<String> ids;
}